<?php 
my_component_load('update_jabatan');

$karyawan_id 	= isset( $_GET['karyawan_id'] ) ? $_GET['karyawan_id']:  0;
$jabatan_id 	= isset( $_GET['jabatan_id'] )  ? $_GET['jabatan_id'] :  0;
$task = isset($_GET['task']) ? $_GET['task'] : ""; 

if($task == "form"){
	if( $_SERVER['REQUEST_METHOD'] =="POST" ){
	form_change_submit($karyawan_id );
	$content ="Update";
	}else{
	$content = form_change_jabatan($karyawan_id , $jabatan_id);
	}
	$pagename="";
	generate_my_web($content, $pagename ,"plain.php" );
	exit;
}else{
	$title=  "Perubahan data jabatan"  ;
	facebox_page('index.php?com='.$_GET['com'].'&task=form&karyawan_id='.$karyawan_id .'&jabatan_id='.$jabatan_id , $title , 200	); 
}